//创建app应用的路由器
import { createRouter,createWebHashHistory } from "vue-router/dist/vue-router";
import PersonCenter from '../pages/Personcenter.vue'
import Study from '../pages/Study.vue'
import Questions from '../pages/Questions.vue'
import Favorites from '../pages/Favorites.vue'
import Personcenter from '../pages/Personcenter.vue'
import Personalnotes from '../pages/Personalnotes.vue'
import Myanswer from '../pages/Myanswer.vue'
import Analysis from '../pages/Analysis.vue'
import Schedulemanagement from '../pages/Schedulemanagement.vue'
import Personalinformation from '../pages/Personalinformation.vue'
import Accountsecurity from '../pages/Accountsecurity.vue'
import Answertheinterface from '../pages/Answertheinterface.vue'
import Homework from '../pages/Homework.vue'

const router = createRouter({
    history:createWebHashHistory(),
    routes:[
        {
            path:'/Personcenter',
            component:PersonCenter
        },
        {
            path:'/study',
            component:Study
        },
        {
            path:'/questions',
            component:Questions
        },
        {
            path:'/favorites',
            component:Favorites
        },
        {
            path:'/Personcenter',
            component:Personcenter,
            children:[
                {
                    path:'favorites',
                    component:Favorites
                },
                {
                    path:'personalnotes',
                    component:Personalnotes
                },
                {
                    path:'myanswer',
                    component:Myanswer
                },
                {
                    path:'analysis',
                    component:Analysis
                },
                {
                    path:'schedulemanagement',
                    component:Schedulemanagement
                },
                {
                    path:'personalinformation',
                    component:Personalinformation
                },
                {
                    path:'accountsecurity',
                    component:Accountsecurity
                }
            ]
        },
        {
            path:'/answertheinterface',
            component:Answertheinterface
        },
        {
            path:'/homework',
            component:Homework
        }
    ]
})

export default router;